Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Period.Between 메서드 날짜 계산 오류 해결 #75

Merged
merged 1 commit into from
Jan 11, 2024

Conversation

SunwoongH
Copy link
Member

Related Issue 📌

Description ✔️

  • Period.between 메서드는 날짜 비교 결과를 n년 n개월 n일로 나타내어 주기 때문에 예를 들어 2023년 1월 11일과 2024년 1월 11일을 비교했을 때 1년 0개월 0일로 계산됩니다. 따라서 해당 결괏값에서 getDays() 메서드를 호출하게 되면 0 값을 반환 받게 되어 날짜 차이가 31일이 넘는 경우를 처리할 수 없는 문제점이 있었습니다. 해당 문제를 ChronoUnit.DAYS.between 메서드를 사용하여 해결하였습니다.

Copy link
Member

@gardening-y gardening-y left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿 좋아요!

@SunwoongH SunwoongH merged commit 04a3668 into develop Jan 11, 2024
1 check passed
@SunwoongH SunwoongH deleted the feature/74 branch July 11, 2024 04:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fix] Period.Between 메서드 날짜 계산 오류 해결
2 participants